<!-- 底部tabbar -->
<template>
  <!--  -->
  <van-tabbar
    v-model="active"
    active-color="red"
    @change="changeFn"
    :route="true"
  >
    <van-tabbar-item icon="home-o" to="/home">首页</van-tabbar-item>
    <van-tabbar-item icon="search" to="/topic">专题</van-tabbar-item>
    <van-tabbar-item icon="friends-o" to="/category">分类</van-tabbar-item>
    <van-tabbar-item icon="setting-o" to="/cart">购物车</van-tabbar-item>
    <van-tabbar-item icon="contact" to="/user">我的</van-tabbar-item>
  </van-tabbar>
</template>

<script>
export default {
  data() {
    return {
      active: 0,
    };
  },
  methods: {
    changeFn(active) {
      // console.log(active);
      this.active = active;
    },
  },
};
</script>
<style scoped>
/* @import url(); 引入css类 */
</style>